<#--
/*
 *业务组件（部门树，部门列表等）
 */
-->
<#macro deptTree arryList>
<link rel="stylesheet" href="plugin/treeview/jquery.treeview.css" />

<script src="plugin/treeview/lib/jquery.cookie.js" type="text/javascript"></script>
<script src="plugin/treeview/jquery.treeview.js" type="text/javascript"></script>
<style>
.deptTree ul{
	display:none;
}
.deptTree ul li{
	padding-left:20px;
}
</style>

<script type="text/javascript">
		$(function() {
			$("#deptTree").treeview({
				collapsed: true,
				persist: "location"
			});
		})
</script>
	<ul id="deptTree" class="deptTree">
		<@tree arryList/>
	</ul>
</#macro>
<#macro tree arryList>
	<#list arryList as node>
		<li>
		<#if node.child?exists>
			<a>${node.name}</a>
			<ul>
				<@tree node.child/>
			</ul>
		<#else>
				<a>${node_index}.${node.name}</a>
		</#if>
		</li>
	</#list>
</#macro>